from command_functions.id_helper import ID_CommandProcesser

class CommandHandler():
    command_processers = [  # Register processer in here.
        ID_CommandProcesser
    ]

    @staticmethod
    def IsCommand(text : str) -> bool:
        for command_processer in CommandHandler.command_processers:
            if command_processer(text).IsMyCommand():
                return True

        return False


    @staticmethod
    def Return(text : str) -> str:
        for command_processer in CommandHandler.command_processers:
            if command_processer(text).IsMyCommand():
                return command_processer(text).Process()

        return ''